﻿Imports Microsoft.VisualBasic

Public Class DBLPOHdrSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public LPOID As New TableField("LPOID", Data.SqlDbType.Int)
    Public Year As New TableField("Year", Data.SqlDbType.Int)
    Public EntryDate As New TableField("EntryDate", Data.SqlDbType.DateTime)
    Public LPONo As New TableField("LPONo", Data.SqlDbType.NVarChar)
    Public LPODate As New TableField("LPODate", Data.SqlDbType.DateTime)
    Public CostCenter As New TableField("CostCenter", Data.SqlDbType.Int)
    Public MainCostCenter As New TableField("MainCostCenter", Data.SqlDbType.Int)
    Public PurReqID As New TableField("PurReqID", Data.SqlDbType.Int)
    Public DeliveryPlace As New TableField("DeliveryPlace", Data.SqlDbType.NVarChar)
    Public SupplierID As New TableField("SupplierID", Data.SqlDbType.Int)
    Public ImportPeriod As New TableField("ImportPeriod", Data.SqlDbType.NVarChar)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "LPOHdrSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal LPOID As String = "", _
                                 Optional ByVal Year As String = "", _
                                 Optional ByVal EntryDate As String = "", _
                                 Optional ByVal LPONo As String = "", _
                                 Optional ByVal LPODate As String = "", _
                                 Optional ByVal CostCenter As String = "", _
                                 Optional ByVal MainCostCenter As String = "", _
                                 Optional ByVal PurReqID As String = "", _
                                 Optional ByVal DeliveryPlace As String = "", _
                                 Optional ByVal SupplierID As String = "", _
                                 Optional ByVal ImportPeriod As String = "", _
                                 Optional ByVal Remarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.LPOID.SetValue(LPOID, MyBase.FieldsArrayList)
        Me.Year.SetValue(Year, MyBase.FieldsArrayList)
        Me.EntryDate.SetValue(EntryDate, MyBase.FieldsArrayList)
        Me.LPONo.SetValue(LPONo, MyBase.FieldsArrayList)
        Me.LPODate.SetValue(LPODate, MyBase.FieldsArrayList)
        Me.CostCenter.SetValue(CostCenter, MyBase.FieldsArrayList)
        Me.MainCostCenter.SetValue(MainCostCenter, MyBase.FieldsArrayList)
        Me.PurReqID.SetValue(PurReqID, MyBase.FieldsArrayList)
        Me.DeliveryPlace.SetValue(DeliveryPlace, MyBase.FieldsArrayList)
        Me.SupplierID.SetValue(SupplierID, MyBase.FieldsArrayList)
        Me.ImportPeriod.SetValue(ImportPeriod, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
